import axios from 'axios'
const request = axios.create({
    timeout: 5000,
})
request.interceptors.request.use((config) => {
    //处理
    const filterarr = ['/api/CSAPI', '/api/xxxx'];
    if (filterarr.indexOf(config.url) >= 0) {
        config.headers = {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    }

    return config
}, err => {
    console.log(err)
})
request.interceptors.response.use((res) => {
    return res
}, err => {
    console.log(err)
})
export default request